by Devin Yang
(This article was automatically translated.)

Published - 8 years ago ( Updated - 8 years ago )

Forcibly clear all the data of the remote repo and generate a new repo,
Be aware this is a dangerous move , know you know what you are doing.

git init
git add .
git commit -m 'Initial commit'
git remote add origin [repo_address]
git push --mirror --force

Tags: git

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


docker,git

Use docker-compose to quickly build a private git service

How to quickly set up an out-of-the-box Gogs environment? This article introduces the use of docker-compose.yml to quickly establish a gogs environment.

git

Use the git logt command to quickly list your own or others' commits

Here are two commands to quickly list all commits of yourself or others

git

Remove the git remote or local tag

How to delete the Tag on the remote or local end of git.